import { Link, useNavigate } from "react-router-dom"

const Login = () => {
    const navigate = useNavigate()
    return (
        <div>
            我是登录页
            {/* 声明式跳转 */}
            <Link to="/acticle">跳转到文章页面</Link>
            {/* 命令式跳转 */}
            <button onClick={() => navigate("/acticle")}>跳转到文章页面</button>
            {/* searchParams传参 */}
            <button onClick={() => navigate('/acticle?id=100&name=jack')}>searchParams传参</button>
            {/* parm传参 */}
            <button onClick={() => navigate('/acticle/101/mouse')}>Params传参</button>
        </div>)
}

export default Login